<?php

namespace app\models;

use app\tools\Table;

class Platform extends \app\models\BaseModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Identity
     * @Column(type="integer", length=8, nullable=false)
     */
    public $id;

    /**
     *
     * @var string
     * @Column(type="string", length=6, nullable=false)
     */
    public $open_id;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=false)
     */
    public $token;

    /**
     *
     * @var string
     * @Column(type="string", length=32, nullable=false)
     */
    public $name;

    /**
     *
     * @var integer
     * @Column(type="integer", length=3, nullable=false)
     */
    public $status;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=false)
     */
    public $icon;

    /**
     *
     * @var integer
     * @Column(type="integer", length=10, nullable=false)
     */
    public $created_at;

    /**
     *
     * @var integer
     * @Column(type="integer", length=10, nullable=false)
     */
    public $updated_at;

    /**
     *
     * @var string
     * @Column(type="string", length=10240, nullable=false)
     */
    public $info;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=false)
     */
    public $auth_type;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        $this->setSchema("user-centor");
        $this->setSource(Table::PLATFORM);
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return Table::PLATFORM;
    }
}
